package cn.ante.ymcc.feign;

import cn.ante.ymcc.doc.CourseDoc;
import cn.ante.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-search",fallbackFactory = SearchFeignClientFallbackFactory.class)
public interface CouserSearchFeignClient {
    @PostMapping("/course/save")
    JSONResult saveElasticSearch(@RequestBody CourseDoc courseDoc);

    @PostMapping("/course/remove/{id}")
    JSONResult removeElasticSearch(@PathVariable("id") Long id);
}
